import 'package:flutter_test/flutter_test.dart';

main() {
  //for
  test("testFor", () {
    var list = ['apples', 'bananas', 'oranges'];
    list.forEach((item) {
      print('${list.indexOf(item)}: $item');
    });

    for (var x in list) {
      print('$x');
    }
  });

  //while dowhile
  test("testWhile", () {
    var a = 0;
    while (a < 3) {
      print("a is $a");
      a++;
    }

    a = 0;
    do {
      print("a is $a");
      a++;
    } while (a < 3);
  });

  //switch case
  test("testSwitch", () {
    var command = 'OPEN';
    switch (command) {
      case 'OPEN':
        break;
      default:
        break;
    }
  });
}
